<?php

class News_Controller extends Template_Controller {
    public function __construct(){
        $this->need_template = false;
        if (in_array(Router::$method, array ('index')) ) {
            $this->need_template = true;
        }

        parent::__construct();
    }

    public function index($competition_id = null){
        $this->title = "News";

        $competition = null;

        if ($competition_id == null) {
            $competition = ORM::factory('competition')->get_last_competition();
        } else {
            $competition = ORM::factory('competition', $competition_id);
        }
    }
}
?>
